<?php
	session_start();

	require_once('../../lib/'.'BaseDir.inc.htm');
	require_once (EIU_LIB.'View.class.htm');
	require_once('../../lib/'.'DBCommon.class.htm');
	
	$q = "SELECT `SuppID`,`ShortName`,`ComName` FROM `supplier_tbl` WHERE `isDeleted`=0 ORDER BY `SuppID` ASC";

	$oDB = new DBCommon();
	$conn =  $oDB->stl_openConn();
	
	$rs = $oDB->stl_db_select($q, $conn);
	
	$i = 0;
	if(is_array($rs)){
		foreach($rs as $key=>$value){
			$data1['suppID'] = $rs[$key]->SuppID;			
			$data1['suppName'] = $rs[$key]->ComName;
			$arr["Result"][$i] = $data1;
			$i++;
		}
		echo json_encode($arr);
	}else{
		echo 'NG';
	}

	$oDB->stl_closeConn($conn);

?>
